
	
function changeItemType(itemType,tdId){ 
         document.form1.itemtype.value=itemType;
         var obj = document.getElementById(tdId);
         var className = obj.className
         if(className != 'SubTabOn'){          
            var objs = obj.parentNode.childNodes;
            for(var i=0;i<objs.length;i++){
            	objs[i].className='SubTab';
            }
            obj.className = 'SubTabOn';
        
           document.getElementById("itemtype").value=itemType;
         }
}	
function advSearch(){
	var display=document.getElementById("schBanner").style.display;
	if(display=='none'){
	    document.getElementById("schBanner").style.display='';
	}else{
	   document.getElementById("schBanner").style.display='none';
	}
	 document.getElementById('cb1').checked=false;
	 document.getElementById('cb2').checked=false;
	 document.getElementById('cb3').checked=false;
	 document.getElementById('cb4').checked=false;
	 document.getElementById('cb5').checked=false;
	 document.getElementById('fangmBanner').style.display='none';
	 document.getElementById('yaowzcBanner').style.display='none';
	 document.getElementById('zuzBanner').style.display='none';
	 document.getElementById('gongxBanner').style.display='none';
	 document.getElementById('chuflyBanner').style.display='none';
	 document.getElementById('schButton').style.display='none';
	}
	
function makeSch(){
		var fangmtext=document.cqueryForm.fangmtext.value;
		var zuztext=document.cqueryForm.zuztext.value;
		var yaowzctext=document.cqueryForm.yaowzctext.value;
		var gongxtext=document.cqueryForm.gongxtext.value;
		var chuflytext=document.cqueryForm.chuflytext.value;
		var schString='';
		if(fangmtext!=''){
			fangmtext = fangmtext.replace(/ /g," AND "+"fangm:");
			if(schString!=""){
				schString+=" AND ";
			}
			schString += "fangm:"+fangmtext;
		}	
		if(zuztext!=''){
			zuztext = zuztext.replace(/ /g," AND "+"zuz:");
			if(schString!=""){
				schString+=" AND ";
			}
			schString += "zuz:"+zuztext;
		}	
		if(yaowzctext!=''){
			yaowzctext = yaowzctext.replace(/ /g," AND "+"yaowzc:");
			if(schString!=""){
				schString+=" AND ";
			}
			schString += "yaowzc:"+yaowzctext;
		}
		if(gongxtext!=''){
			gongxtext = gongxtext.replace(/ /g," AND "+"gongx:");
			if(schString!=""){
				schString+=" AND ";
			}
			schString += "gongx:"+gongxtext;
		}
		if(chuflytext!=''){
			chuflytext = chuflytext.replace(/ /g," AND "+"chufly:");
			if(schString!=""){
				schString+=" AND ";
			}
			schString += "chufly:"+chuflytext;
		}
		if(schString==''){
		   alert("请输入搜索词！");
		}else{
			//schString = schString.replace(/ /g," AND ");
			//alert("schString is "+schString);
			document.cqueryForm.q.value=schString;
			cqueryForm.submit();
		   }
	}
	   
function showBanner(value){
	var display=document.getElementById(value).style.display;
	if(display=='none'){
		document.getElementById(value).style.display='';
		document.getElementById('schButton').style.display=''; 
	}else{
	    document.getElementById(value).style.display='none';
	}
	var display1=document.getElementById('fangmBanner').style.display;
	var display2=document.getElementById('yaowzcBanner').style.display;
	var display3=document.getElementById('zuzBanner').style.display;
	var display4=document.getElementById('gongxBanner').style.display;
	var display5=document.getElementById('chuflyBanner').style.display;
	if(display1=='none'&&display2=='none'&&display3=='none'&&display4=='none'&&display5=='none')
	   document.getElementById('schButton').style.display='none';
   }